package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserChannelOutMapper;
import com.ruoyi.system.domain.SysUserChannelOut;
import com.ruoyi.system.service.ISysUserChannelOutService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户出金通道关系Service业务层处理
 *
 * @author Ericcc
 * @date 2021-02-18
 */
@Service
public class SysUserChannelOutServiceImpl implements ISysUserChannelOutService
{
    @Autowired
    private SysUserChannelOutMapper sysUserChannelOutMapper;

    /**
     * 查询用户出金通道关系
     *
     * @param userId 用户出金通道关系ID
     * @return 用户出金通道关系
     */
    @Override
    public SysUserChannelOut selectSysUserChannelOutById(Long userId)
    {
        return sysUserChannelOutMapper.selectSysUserChannelOutById(userId);
    }

    /**
     * 查询用户出金通道关系列表
     *
     * @param sysUserChannelOut 用户出金通道关系
     * @return 用户出金通道关系
     */
    @Override
    public List<SysUserChannelOut> selectSysUserChannelOutList(SysUserChannelOut sysUserChannelOut)
    {
        return sysUserChannelOutMapper.selectSysUserChannelOutList(sysUserChannelOut);
    }

    /**
     * 新增用户出金通道关系
     *
     * @param sysUserChannelOut 用户出金通道关系
     * @return 结果
     */
    @Override
    @Transactional
    public int insertSysUserChannelOut(SysUserChannelOut sysUserChannelOut)
    {
        return sysUserChannelOutMapper.insertSysUserChannelOut(sysUserChannelOut);
    }

    /**
     * 修改用户出金通道关系
     *
     * @param sysUserChannelOut 用户出金通道关系
     * @return 结果
     */
    @Override
    @Transactional
    public int updateSysUserChannelOut(SysUserChannelOut sysUserChannelOut)
    {
        return sysUserChannelOutMapper.updateSysUserChannelOut(sysUserChannelOut);
    }

    /**
     * 删除用户出金通道关系对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    @Transactional
    public int deleteSysUserChannelOutByIds(String ids)
    {
        return sysUserChannelOutMapper.deleteSysUserChannelOutByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户出金通道关系信息
     *
     * @param userId 用户出金通道关系ID
     * @return 结果
     */
    @Override
    @Transactional
    public int deleteSysUserChannelOutById(Long userId)
    {
        return sysUserChannelOutMapper.deleteSysUserChannelOutById(userId);
    }
}